package com.okq.entity;

import com.okq.entity.base.DataEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * 描述 : 客户表实体类
 * 作者 : zdl
 * 日期 : 2017/6/27 16:58
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "tb_customer")
public class Customer extends DataEntity implements Serializable {
    private static final long serialVersionUID = 424613404591009266L;
    /**
     * 客户名称
     */
    @Column(name = "name", length = 100)
    private String name;
    /**
     * 联系方式
     */
    @Column(name = "contact", length = 13)
    private String contact;
    /**
     * 邮箱
     */
    @Column(name = "email", length = 100)
    private String email;
    /**
     * 客户地址
     */
    @Column(name = "address", length = 200)
    private String address;
    /**
     * 级别 0:普通 1:会员
     */
    @Column(name = "level")
    private Integer level;
    /**
     * 负责人(销售人员)Id
     */
    @Column(name = "chargeId", length = 40)
    private String chargeId;
    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /* ---------------- 查询条件 ---------------- */
    /**
     * 销售负责人名字
     */
    @Transient
    private String userName;
    /**
     * 用户Ids
     */
    @Transient
    private String userIds;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getChargeId() {
        return chargeId;
    }

    public void setChargeId(String chargeId) {
        this.chargeId = chargeId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserIds() {
        return userIds;
    }

    public void setUserIds(String userIds) {
        this.userIds = userIds;
    }
}
